package methods;

import org.rsbuddy.widgets.Lobby;
import com.rsbuddy.script.ActiveScript;
import com.rsbuddy.script.methods.Game;
import com.rsbuddy.script.methods.Widgets;

public class select extends ActiveScript{
	private static int waiter = 0;
	public static void Lobby(){
		try{
			if(Lobby.isValid()){
				if(Lobby.openTab(Lobby.LobbyTab.WORLD_SELECT)){
					if(Widgets.get(910).getComponent(11).getText().equals("World 8")){
						waiter = 0;
						Lobby.clickPlay();
						while(!Game.isLoggedIn() && waiter < 100){
							sleep(100);
							waiter++;
						}
					}else{
						if(Widgets.get(910).getComponent(55).getComponent(1).click(true)){
							if(Widgets.get(910).getComponent(64).getComponent(7).click(true)){
								
							}
						}
					}
				}
			}
			return;
		} catch(Exception e){
			
		}
	}
	@Override
	public int loop() {
		// TODO Auto-generated method stub
		return 0;
	}
}
